- 
                Notifications
    
You must be signed in to change notification settings  - Fork 74
 
[XPU][TritonGEN] Revamp SIMD block memory access operations #2756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            victor-eds
  merged 4 commits into
  intel:main
from
victor-eds:triton-gen-sub-group-block-memaccess
  
      
      
   
  Nov 20, 2024 
      
    
                
     Merged
            
            [XPU][TritonGEN] Revamp SIMD block memory access operations #2756
                    victor-eds
  merged 4 commits into
  intel:main
from
victor-eds:triton-gen-sub-group-block-memaccess
  
      
      
   
  Nov 20, 2024 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    Revamp `tritongen.simdblock[read|write]` operations: - Rename to `tritongen.sub_group_block_[read|write]` - Implement type verification in signature - Represent scalar block memory accesses with a scalar type instead of `vector<1xty>` - Revamp assembly format Signed-off-by: victor-eds <[email protected]>
0abb7b4    to
    a0ea9f6      
    Compare
  
    
              
                    victor-eds
  
              
              commented
              
                  
                    Nov 19, 2024 
                  
              
              
            
            
              
                    sommerlukas
  
              
              approved these changes
              
                  
                    Nov 19, 2024 
                  
              
              
            
            
              
                    mfrancepillois
  
              
              approved these changes
              
                  
                    Nov 19, 2024 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
              
                    victor-eds
  
              
              commented
              
                  
                    Nov 19, 2024 
                  
              
              
            
            
      Comment on lines
    
      317
     to 
      342
    
  
  | def TritonGEN_SubGroupBlockMemoryAccessElementType | ||
| : AnyTypeOf<[I8, I16, I32, I64], | ||
| "Valid sub-group block memory access element type">; | ||
| 
               | 
          ||
| def TritonGEN_SubGroupBlockMemoryAccessType | ||
| : AnyTypeOf<[TritonGEN_SubGroupBlockMemoryAccessElementType, | ||
| FixedVectorOfLengthAndType< | ||
| [2, 4, 8], | ||
| [TritonGEN_SubGroupBlockMemoryAccessElementType]>, | ||
| // Vectors of length 16 only allowed for i8 for now. | ||
| FixedVectorOfLengthAndType<[16], [I8]>], | ||
| "Valid sub-group block memory access type">; | ||
| 
               | 
          ||
| def TritonGEN_SubGroupBlockMemoryAccessPointerType | ||
| : Type<And<[LLVM_AnyPointer.predicate, | ||
| Or<[CPred<"::llvm::cast<::mlir::LLVM::LLVMPointerType>($_self)" # | ||
| ".getAddressSpace() == " # | ||
| "static_cast<unsigned>(kCrossWorkgroup)">, | ||
| CPred<"::llvm::cast<::mlir::LLVM::LLVMPointerType>($_self)" # | ||
| ".getAddressSpace() == " # | ||
| "static_cast<unsigned>(kWorkgroup)">]>]>, | ||
| "LLVM pointer in local or global OpenCL address space", | ||
| "::mlir::LLVM::LLVMPointerType">; | ||
| 
               | 
          ||
| def TritonGEN_SubGroupBlockReadOp: TritonGEN_Op<"sub_group_block_read"> { | ||
| let summary = "Sub-group block read."; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder before merge: use spaces instead of tabs for indentation.
              
                    whitneywhtsang
  
              
              approved these changes
              
                  
                    Nov 19, 2024 
                  
              
              
            
            
              
                    chengjunlu
  
              
              approved these changes
              
                  
                    Nov 20, 2024 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Revamp
tritongen.simdblock[read|write]operations:tritongen.sub_group_block_[read|write]vector<1xty>Closes #2750